package cn.sgjk.train.business.controller;


import cn.sgjk.train.common.context.LoginMemberContext;
import cn.sgjk.train.common.resp.CommonResp;
import cn.sgjk.train.common.resp.PageResp;
import cn.sgjk.train.business.req.StationQueryReq;
import cn.sgjk.train.business.req.StationSaveReq;
import cn.sgjk.train.business.resp.StationQueryResp;
import cn.sgjk.train.business.service.StationService;
import jakarta.validation.Valid;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/station")
public class StationController {

    private static final Logger LOG = LoggerFactory.getLogger(StationController.class);
    @Autowired
    private StationService stationService;



    @GetMapping("/query-all")
    public CommonResp<List<StationQueryResp>> queryAll() {
        List<StationQueryResp> stationResps = stationService.queryAll();
        return new CommonResp<>(stationResps);
    }

}

